#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    connect(ui->btnget, &QPushButton::clicked, [=](){
        qDebug()<<ui->widget1->getNum()<<endl;
    });

    connect(ui->btnset, &QPushButton::clicked, [=](){
        ui->widget1->setNum(55);
    });
}

Widget::~Widget()
{
    delete ui;
}

